package com.zdxlz.fcmp.upms.api.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zdxlz.fcmp.common.mybatis.base.BaseEntity;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import static com.zdxlz.fcmp.common.core.constant.ParameterVerifyMsgConstants.USERROLE_ROLEID_VERIFY_MSG;
import static com.zdxlz.fcmp.common.core.constant.ParameterVerifyMsgConstants.USERROLE_USERID_VERIFY_MSG;

/**
 * 用户角色关联表(SystemUserRole)表实体类
 *
 * @author makejava
 * @since 2025-02-24 14:30:47
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("system_user_role")
public class SystemUserRole extends BaseEntity {

    /**
     * 用户ID
     */
    @TableField("user_id")
    @NotNull(message = USERROLE_USERID_VERIFY_MSG)
    private Integer userId;
    /**
     * 角色ID
     */
    @TableField("role_id")
    @NotNull(message = USERROLE_ROLEID_VERIFY_MSG)
    private Integer roleId;
}
